# xinhua = {
#     '麓': '山脚下',
#     '路': '道，往来通行的地方；方面，地区：南～货，外～货；种类：他俩是一～人',
#     '蕗': '甘草的别名',
#     '潞': '潞水，水名，即今山西省的浊漳河；潞江，水名，即云南省的怒江'
# }
# print(xinhua)
person = {
    'name': '王大锤',
    'age': 55,
    'height': 168,
    'weight': 60,
    'addr': '成都市武侯区科华北路62号1栋101',
    'tel': '13122334455',
    'emergence contact': '13800998877'
}
personAngle = {
    'a': 3
}
# print(person)
# # dict函数(构造器)中的每一组参数就是字典中的一组键值对
# person = dict(name='王大锤', age=55, height=168, weight=60, addr='成都市武侯区科华北路62号1栋101')
# print(person)
# print(len(person))
# for key in person:
#     print(person[key])
#
# print(personAngle.get)
# print(person.get('name'))       # 王大锤
# print(person.get('sex'))        # None
# print(person.get('sex', True))  # True 指定默认值
# print(person.keys()) # dict_keys(['name', 'age', 'height', 'weight', 'addr'])
# print(person.values())  # dict_values(['王大锤', 25, 178])
# print(person.items())   # dict_items([('name', '王大锤'), ('age', 25), ('height', 178)])
# for key, value in person.items():
#     print(key, value)
# for key in person.keys():
#     print(key)
# words = input('输入一段英文对话')
# dian = {}
# print(len(words))
# for word in words:
#     if word in dian:
#         dian[word] += 1
#     else:
#         dian[word] = 1
# print(dian)
# sorted_keys = sorted(dian, key=dian.get, reverse=True)
# print(sorted_keys)
# for i in sorted_keys:
#     print('字母'+ i + ", 出现了 %d" % (dian[i]))

stocks = {
    'AAPL': 191.88,
    'GOOG': 1186.96,
    'IBM': 149.24,
    'ORCL': 48.44,
    'ACN': 166.89,
    'FB': 208.09,
    'SYMC': 21.29
}
print(stocks)
item3 = {x: stocks[x] for x in stocks if stocks[x] > 100}
print(item3)